//
//  CertificateQueryTableCell.h
//  CommunityNannyO2O
//
//  Created by apple on 15/8/13.
//  Copyright (c) 2015年 Apple. All rights reserved.
//

#import "CertificateQueryTableCell.h"
#import "APIAdress.h"
#import "MBProgressHUD+YC.h"
#import "MJExtension.h"
#import "AccountTool.h"
#import "UIViewController+Create.h"
#import "CustomTextField.h"
#import "AppConfig.h"
#import "QXNetWorkTool.h"
#import "CertificateQueryCellInfo.h"

@interface CertificateQueryTableCell()<QXNetWorkToolDelegate,
UITableViewDataSource,UITableViewDelegate>

@property (weak, nonatomic) IBOutlet UITableView *tableView;

@property (strong, nonatomic) NSMutableArray *titleData;

@end

@implementation CertificateQueryTableCell

@synthesize titleData;
@synthesize infoData;

+ (instancetype)cellWithTableView:(UITableView *)tableView
{
    static NSString *ID = @"CertificateQueryTableCell";
    CertificateQueryTableCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        
        cell = [[[NSBundle mainBundle] loadNibNamed:ID owner:nil options:nil]firstObject];
        
        [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
    }
    
    return cell;
}

-(void)awakeFromNib
{
    self.tableView.dataSource = self;
    
    self.tableView.delegate = self;
    
    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    
    self.tableView.scrollEnabled = NO;
    
    self.titleData = [NSMutableArray arrayWithObjects:
                      @"姓      名：",
                      @"性      别：",
                      @"国      籍：",
                      @"民      族：",
                      @"迷笛   ID：",
                      @"考级专业：",
                      @"等      级：",
                      @"发证日期：",
                      @"起  止 级：",
                      @"证书编号：",
                      nil];
    
    self.infoData = [[NSMutableArray alloc]init];
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return [self.titleData count];
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 28;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    CertificateQueryCellInfo *cell = [CertificateQueryCellInfo cellWithTableView:tableView];
    
    cell.title.text = [self.titleData objectAtIndex:indexPath.row];
    cell.infoLabel.text = [self.infoData objectAtIndex:indexPath.row];
    
    return cell;
}




@end




















